<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>订单列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="resources/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="resources/css/public.css" media="all" />
</head>
<body class="childrenBody">

<form class="layui-form">
    <blockquote class="layui-elem-quote quoteBox">
        <form class="layui-form">
            <div class="layui-inline">
                <!--<div class="layui-input-inline">
                    <input type="text" class="layui-input searchVal" placeholder="请输入搜索的内容" />
                </div>
                <a class="layui-btn search_btn" data-type="reload">搜索</a>-->
            </div>
        </form>
    </blockquote>
    <table id="orderProductList" lay-filter="orderProductList">
        <input type="hidden" id="ordeNo" class="ordeNo" name="ordeNo"></input>
    </table>
    <table id="ordertotal" lay-filter="ordertotal">
        <input type="hidden" id="ordeNo1" class="ordeNo" name="ordeNo"></input>
    </table>
    <!--操作-->
    <script type="text/html" id="orderProductListBar">
        <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="look">商品的详情</a>

    </script>
</form>
<script type="text/javascript" src="resources/layui/layui.js"></script>
<script th:inline="none">
    layui.use(['form','layer','laydate','table','laytpl'],function(){
        var form = layui.form,
            layer = parent.layer === undefined ? layui.layer : top.layer,
            $ = layui.jquery,
            laydate = layui.laydate,
            laytpl = layui.laytpl,
            table = layui.table;
        var orderno=$("#ordeNo1").val();

        //商品列表
        var tableIns = table.render({
            totalRow: true,
            elem: '#ordertotal',
            url:"orderLines/total",
            page : false,
            id : "ordertotalTable",
            where:{
                lineOrdeNo:orderno
            },
            cols : [[
                {field: 'linetotal', title: '合计金额',align:"right", totalRow: true},
            ]]
        });
    })
</script>
<script th:inline="none">
    layui.use(['form','layer','laydate','table','laytpl'],function(){
        var form = layui.form,
            layer = parent.layer === undefined ? layui.layer : top.layer,
            $ = layui.jquery,
            laydate = layui.laydate,
            laytpl = layui.laytpl,
            table = layui.table;
        var orderno=$("#ordeNo").val();

        //商品列表
        var tableIns = table.render({
            totalRow: true,
            elem: '#orderProductList',
            url:"orderLines/selectorderLine",
            page : false,
            id : "orderProductListTable",
            where:{
                lineOrdeNo:orderno
            },
            cols : [[
                {type: "checkbox", fixed:"left"},
                {field: 'product', title: '商品名称',width:150, align:"center",totalRowText:'合计', templet:function (row) {
                        return row.product.prodName;
                    }},
                {field: 'lineCount', title: '数量',align:"center", totalRow: true},
                {field: 'product', title: '单价',width:150, align:"center",templet:function (row) {
                        return row.product.prodPrice;
                    }},
                {field: 'account', totalRow:true,title: '金额',align:"right",templet:function (row) {
                        return (row.lineCount * row.product.prodPrice);
                    }},
               /* {title: '操作', width:250, templet:'#orderProductListBar',fixed:"right",align:"center"}*/
            ]],
        });

    })

</script>

</body>
</html>